import api from "./index";
import { axios } from "@/utils/request";
import Qs from "qs";

// export function sexAnalysis(parameter) {
//   return axios({
//     url: api.SexAnalysis,
//     method: 'get',
//     params: parameter
//   })
// }
// export function analysis(parameter1, parameter2) {
//     return axios({
//       url: `${api.Analysis}?name=${parameter1}`,
//       method: 'post',
//       data: parameter2
//     })
//   }

export function getSupervisionObjectList (parameter) {
  return axios({
    url: "/SupervisionObject/GetList",
    method: "get",
    params: parameter,
  });
}
export function getCurMonthData (parameter) {
  return axios({
    url: "/Analysis/GetCurMonthData",
    method: "get",
    params: parameter,
  });
}
export function getSupervisionObjectByID (parameter) {
  return axios({
    url: "/SupervisionObject/GetSupervisionObjectByID",
    method: "get",
    params: parameter,
  });
}
export function removeSupervisionObject (parameter) {
  return axios({
    url: "/SupervisionObject/RemoveSupervisionObject",
    method: "get",
    params: parameter,
  });
}

export function saveSupervisionObject (parameter) {
  return axios({
    url: `/SupervisionObject/SaveSupervisionObject`,
    method: "post",
    data: parameter,
  });
}
export function delSupervisionObject (parameter) {
  return axios({
    url: `/SupervisionObject/DeleteByIds`,
    method: "post",
    data: parameter,
  });
}

export function getVisitRecordsList (parameter) {
  return axios({
    url: "/VisitRecords/GetList",
    method: "get",
    params: parameter,
  });
}
export function getVisitRecordsByID (parameter) {
  return axios({
    url: "/VisitRecords/GetVisitRecordsByID",
    method: "get",
    params: parameter,
  });
}

export function saveVisitRecords (parameter) {
  return axios({
    url: `/VisitRecords/SaveVisitRecords`,
    method: "post",
    data: parameter,
  });
}
export function delVisitRecords (parameter) {
  return axios({
    url: `/VisitRecords/DeleteByIds`,
    method: "post",
    data: parameter,
  });
}
export function getHelpList (parameter) {
  return axios({
    url: "/Help/GetList",
    method: "get",
    params: parameter,
  });
}
export function getHelpByID (parameter) {
  return axios({
    url: "/Help/GetHelpByID",
    method: "get",
    params: parameter,
  });
}

export function saveHelp (parameter) {
  return axios({
    url: `/Help/SaveHelp`,
    method: "post",
    data: parameter,
  });
}
export function delHelp (parameter) {
  return axios({
    url: `/Help/DeleteByIds`,
    method: "post",
    data: parameter,
  });
}

export function getActivityList (parameter) {
  return axios({
    url: "/Activity/GetList",
    method: "get",
    params: parameter,
  });
}
export function getActivityByID (parameter) {
  return axios({
    url: "/Activity/GetActivityByID",
    method: "get",
    params: parameter,
  });
}

export function saveActivity (parameter) {
  return axios({
    url: `/Activity/SaveActivity`,
    method: "post",
    data: parameter,
  });
}
export function delActivity (parameter) {
  return axios({
    url: `/Activity/DeleteByIds`,
    method: "post",
    data: parameter,
  });
}

/** 通报列表 */
export function getNotificationList (parameter) {
  return axios({
    url: "/NotificationRecord/GetList",
    method: "get",
    params: parameter,
  });
}
export function getNotificationByID (parameter) {
  return axios({
    url: "/NotificationRecord/GetNotificationRecordByID",
    method: "get",
    params: parameter,
  });
}

export function saveNotification (parameter) {
  return axios({
    url: `/NotificationRecord/SaveNotificationRecord`,
    method: "post",
    data: parameter,
  });
}
export function delNotification (parameter) {
  return axios({
    url: `/NotificationRecord/DeleteByIds`,
    method: "post",
    data: parameter,
  });
}

/** 工作通知 */
export function getWorkNoticeList (parameter) {
  return axios({
    url: "/WorkNotice/GetList",
    method: "get",
    params: parameter,
  });
}
export function getWorkNoticeByID (parameter) {
  return axios({
    url: "/WorkNotice/GetWorkNoticeByID",
    method: "get",
    params: parameter,
  });
}

export function saveWorkNotice (parameter) {
  return axios({
    url: `/WorkNotice/SaveWorkNotice`,
    method: "post",
    data: parameter,
  });
}
export function delWorkNotice (parameter) {
  return axios({
    url: `/WorkNotice/DeleteByIds`,
    method: "post",
    data: parameter,
  });
}
// 导出
export function exportVisit (parameter) {
  return axios({
    url: `/Export/ExportVisitRecords`,
    method: "get",
    params: parameter,
  });
}
